X L0AT810a[2] RW!((  0D 0Re  ٱF 0E  F D 08DE BLDi1i1 ЋЈ8`SYS EXSOD/xH)ӄDEDFȱD;GFDȱDI8eDDEDFDEFGIFGhөX"/l .  .  / @ Y0 / m `hh8`aPBXEDOC 4 BXEDOC 6 [   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ CHAPTER 6 THE SYSTEM FUNCTION MENU To enter the System Function menu from the Main menu, Type [S] and press [RETURN]. The System Function menu appears on the screen. ---------------------------------------- | DIRECTORY TODAY:20SE88 | | D1> | | .............................. | | DOS SYSTEM FUNCTION MENU | | | | FILES LISTING | | WORKING DIRECTORY | |  | | RUN A BATCH FILE | | SET CURRENT DATE | | | | INITIALIZE DISK | | CREATE DOSXE.SYS FILE | | DUPLICATE A DISK | | ALLOW DOS2.X ACCESS | | .............................. | | |  | SELECT ITEM OR ESCAPE FOR MAIN MENU | ---------------------------------------- Below the pathname of the working directory, shown under the word "DIRECTORY" in the top left corner of the screen, is the list of options available in this menu. Select an option by pressing the key corresponding to the highlighted letter, then press [RETURN]. At the bottom is a reminder that you can return  to the Main menu at any time by pressing [ESC]. After you execute an option, DOS XE displays the line: ---------------------------------------- | SELECT ITEM OR ESCAPE OR RETURN: | ---------------------------------------- This is a reminder that you can press a letter and select an option from the current menu, even though it is not displayed. You can also press [ESC] to return to the Main PAGE 60 menu, or [RETURN] to display the current menu again. OPTIONS Fo llowing are detailed descriptions of each option available in the System Function menu. We recommend that you read each section before executing an option. Files Listing  This option gives a listing of the contents of a directory. It is available in all three menus. Detailed instructions are contained in CHAPTER 4. Working Directory  This option lets you change your working directory. It is available in all three menus. Detailed instructions are contained in CHAPTER 4. Run A Batch File  A batch file is a text file of DOS XE commands. It can be used to automate DOS XE functions. A batch file can be no longer than 511 bytes, but it can invoke another batch file. (See COMMAND LINE EN TRY and BATCH FILES in CHAPTER 7.) This option runs a batch file. Type [R] and press [RETURN]. DOS XE displays this prompt: ---------------------------------------- | RUN A BATCH FILE | | | | RUN WHAT FILE? | ---------------------------------------- This prompt asks for the pathname of the batch file to run. Enter the pathname and press [RETURN]. Example: Run a batch file named BACKUP.BAT. PAGE 61 1. Select [R] from the menu. This prompt appears: ---------------------------------------- | RUN A BATCH FILE | | | | RUN WHAT FILE?  | ---------------------------------------- 2. Enter D1>BACKUP.BAT and press [RETURN]. The file loads and runs. Set Current Date  DOS XE datestamps each file, but you must tell DOS XE what the date is. This option lets you set the correct date. Type [S] and press [RETURN]. DOS XE displays the following prompt: ---------------------------------------- | SET CURRENT DATE | | | | GIVE DATE IN FORM DDMMYY | | VALID MONTHS(MM) ARE: | | JA BB MR AP MY JN JL AG SE OC NO DE | | | | SET TO WHAT DATE? | ----------------------------------------  This prompt asks what the correct date is. It also is a reminder of the form in which the date must be entered: two characters each for the day, month and year, with no spaces between them. A single character day may be entered as one character or may be preceded by a zero. The month must be entered as in the example. Enter the date and press [RETURN]. Example: Set the date to January 1, 1989. PAGE 62 1. Select [S] from the menu and this message will appear: ----------------------------------------  | SET CURRENT DATE | | | | GIVE DATE IN FORM DDMMYY | | VALID MONTHS(MM) ARE: | | JA BB MR AP MY JN JL AG SE OC NO DE | | | | SET TO WHAT DATE? | ---------------------------------------- 2. Enter 01JA89 or 1JA89 and press [RETURN]. Any files you  work on today will be stamped with that date. Initialise Disk This option prepares a new disk for use with DOS XE. It is also available in the File Access menu. Detailed instructions are contained in CHAPTER 4. Create DOS XE.SYS File This option writes DOS XE from the computer memory back into the disk file DOS XE.SYS, the method used to save a reconfigured version of DOS XE. (See CONFIGURING DOS XE in CHAPTER 2.) Type [C] and press [RETURN]. DOS XE displays this prompt: ---------------------------------------- | CREATE DOS XE.SYS FILE | | | | WHAT DRIVE NUMBER | ----------------------------------------  Enter [1] and press [RETURN]. The file is written to the disk. WARNING: Do not use this option unless a files listing for the disk shows at least 15K bytes free. If a DOS XE.SYS  file already exists, this command will overwrite it, unless it is protected. PAGE 63 Duplicate a Disk This option copies the contents of one disk onto another disk. The original disk is called the source disk and the new disk is the destination disk. It is a good idea to cover the write-protect notch on the source disk so that it ! will not accidently be erased. The destination disk is automatically initialised during the duplication process. Type [D] and press [RETURN]. DOS XE displays the following prompt. " ---------------------------------------- | DUPLICATE A DISK | | | | DUPLICATE FROM WHAT DRIVE NUMBER? | ----------------------------------------# This prompt asks which disk drive contains the source disk. This will usually be drive one. Type the number (without the "D") and press [RETURN]. DOS XE displays the following prompt:$ ---------------------------------------- | DUPLICATE TO WHAT DRIVE NUMBER? | ---------------------------------------- This prompt asks which disk drive wi%ll contain the destination disk. If you only have one drive, this will be drive one. If you have more than one drive, this will usually be drive two. If the source drive number is different f&rom the destination drive number, DOS XE displays this prompt: ---------------------------------------- | PUT TO DISK IN DRIVE 2 | | PUT FROM DISK IN DRIVE 1 ' | | | | PUSH START TO CONTINUE | | PUSH SELECT TO STOP NOW | ---------------------------------------- If the s(ource drive number is the same as the destination drive number, DOS XE displays the following prompt: PAGE 64 ---------------------------------------- ) | PUT FROM DISK IN DRIVE 1 | | | | PUSH START TO CONTINUE | | PUSH SELECT TO STOP NOW | ---------------------------------------- * These prompts remind you to put the disk(s) in the proper drive(s) and press [START] to begin the duplication or press [SELECT] to abort it. If you want to continue the duplicati+on, press [START]. If you are using two drives, the duplication will be completed. If you are using one drive, DOS XE does part of the duplication and then displays this prompt: , ---------------------------------------- | PUT TO DISK IN DRIVE 1 | | | | | | PUSH START TO CONTINUE- | | PUSH SELECT TO STOP NOW | ---------------------------------------- This prompt tells you to swap the source and destination disks. Swap the disks and pre.ss [START]. Depending on how much information is on the source disk, you may have to swap disks several times. Example 1: Duplicate a disk with one drive. 1. Sel/ect [D] from the menu and follow this sequence of prompts: ---------------------------------------- | DUPLICATE A DISK | | | 0 | DUPLICATE FROM WHAT DRIVE NUMBER? | ---------------------------------------- 2. Enter [1] and press [RETURN]. PAGE 65 1 ---------------------------------------- | DUPLICATE TO WHAT DRIVE NUMBER? | ---------------------------------------- 3. Enter [1] and press [RETURN]. -----2----------------------------------- | PUT FROM DISK IN DRIVE 1 | | | | PUSH START TO CONTINUE | | PUSH SELECT TO STOP NOW | 3---------------------------------------- 4. Press [START]. The word CONTINUING appears, while the disk drive reads the first disk. After a moment, this prompt is displayed: 4 ---------------------------------------- | PUT TO DISK IN DRIVE 1 | | | | | | PUSH START TO CONTINUE 5 | | PUSH SELECT TO STOP NOW | ---------------------------------------- 5. Press [START]. The computer displays CONTINUING while information is written to the secon6d disk. 6. Switch disks according to the prompts until the process is complete. Example 2: Duplicate a disk using two drives. 1. Select [D] fr7om the System Function menu. The following prompt appears: ---------------------------------------- | DUPLICATE A DISK | | | 8 | DUPLICATE FROM WHAT DRIVE NUMBER? | ---------------------------------------- 2. Enter [1] and press [RETURN]. PAGE 66 -9--------------------------------------- | DUPLICATE TO WHAT DRIVE NUMBER? | ---------------------------------------- 3. Enter [1] and press [RETURN]. -----------:----------------------------- | PUT TO DISK IN DRIVE 2 | | PUT FROM DISK IN DRIVE 1 | | | | PUSH START TO CONTINUE | | PU;SH SELECT TO STOP NOW | ---------------------------------------- 4. Press [START]. The computer displays CONTINUING while the disk is being copied. Allo<w DOS2.X Access This option allows you to access disks which are in DOS 2.0 or DOS 2.5 formats. (DOS 2.0 and DOS 2.5 are previous disk operating systems for Atari computers.) = The extra program code to accomplish this access takes up valuable memory space; therefore, it is not loaded unless you ask for it with this option. NOTE: The DOS2.SYS file must be >on the disk in drive one when you select this option. Once the code has been loaded, you can address any DOS 2.0 or 2.5 disk by calling it A: in the pathname (instead of D:). All DOS ?read functions except the Initialise Disk can be performed on DOS 2.0 and DOS 2.5 disks. Type [A] and press [RETURN]. DOS XE displays this prompt: PAGE 67 @ ---------------------------------------- | ALLOW DOS 2.X ACCESS | | | | CAUTION | | THIS OPTION DESTROYS PROGRAAM AREA | | | | PUSH START TO CONTINUE | | PUSH SELECT TO STOP NOW | ---------------------------------------- ThBis prompt warns you that loading the DOS 2.X code overwrites the program area of memory. If you have valuable information in memory which has not been saved, you can bail out now. This warning is not shown ifC the program area has already been overwritten. Press [START] to load the DOS 2.X code. DOS XE displays the CONTINUING prompt while the process is completed. D PAGE 68 CHAPTER 7 ADVANCED TOPICS COMMAND LINE ENTRY Once you becomeE familiar with DOS XE menus, you can speed things up with command line entry. Most DOS XE options require additional information to execute. For example, the Working Directory option asks Fyou the pathname of the new working directory. The answer to this question is called the parameter. DOS XE permits you to enter parameters at the same time you select an option. This is called a commGand line entry. For example, from the File Access menu, use the menus as follows: 1. type [W] and press [RETURN]. ---------------------------------------- | WORKINGH DIRECTORY | | | | GIVE NAME FOR WORKING DIRECTORY | | NAME? | ---------------------------------------- I 2. Type D1>LETTERS and press [RETURN]. You can do the same thing by typing this command line: W D1>LETTERS[RETURN] DOS XE displays each J of the prompts and fills in the responses from the parameters in the command line. This speeds things up and gives a visual reminder of what is happening. A command line can bKe the first letter of an option, or, to be more readable, it can be a whole word. DOS XE only looks at the first letter, so the word and the spelling don't matter. PLAGE 69 You could use WORKINGDIRECTORY or WORKDIR instead of "W" in the above example. This is not normally used for command line entry, but it is good practice for batch files. (See BATCMH FILES in this chapter). DOS XE treats each space (or group of spaces) in a command as a [RETURN]. After it accepts the W, it sees the space and enters a [RETURN] so the Working Directory opNtion is executed. Some commands can be destructive (like initialising a disk). They have prompts that must be answered by pressing [START]. These prompts cannot be answered by commaOnd lines. DOS XE will wait for you to actually press [START]. This protects your files. Similarly, error messages require that you press [START]. Regardless of the structure of a comPmand line, DOS XE will not pass an error message. DOS XE will pause until you have seen the message and pressed [START]. Errors abort the rest of the command line, as well as any active batch file. Q In addition to accepting parameters for menu options, the command line will let you move between menus. A period (full stop) at the beginning of a command line always takes you to the Main menu., liRke an [ESC] does in the menu prompts. Once inside the Main menu, other menus are selected in the usual manner. For example, if you wanted to view a file named D1>FILE and you are Sin the Machine Language Access menu, you could use the menus as follows: press [ESC]. You will see the following menu: PAGE 70 T ---------------------------------------- | DOS XE DISK OPERATING SYSTEM | | COPYRIGHT 1988 ATARI CORP. | | VERSION 01.00 | |................................ U | | | | MAIN MENU | | | | FILE ACCESS MENU | | MACHINE LANGUAGE ACCESS MENUV | | SYSTEM FUNCTION MENU | | | | EXIT TO BASIC | |................................ | -------------------------W--------------- Type [F] then [RETURN] to go to the File Access menu. ---------------------------------------- | DIRECTORY TODAY:20SE88 | | D1> X | |............................. | | DOS XE FILE ACCESS MENU | | | | FILES LISTING WORKING DIRECTORY | | PROTECTY FILES NEW DIRECTORY | | UNPROTECT FILES DELETE DIRECTORY | | ERASE FILES COPY FILES | | RENAME FILES APPEND TO A FILE | | VIEW A FILE INITIALIZE A DISK | | ..Z...................... | | | | SELECT ITEM OR ESCAPE FOR MAIN MENU: | ---------------------------------------- Type [V] and press [RETURN].[ The following prompt appears: ---------------------------------------- | VIEW A FILE | | | | VIEW WHAT FILE? \ | ---------------------------------------- Type D1>FILE and press [RETURN]. The file is displayed. Or, you could do the same thing with the following command li]ne: PAGE 71 .F V D1>FILE[RETURN] DOS XE will flip through the menus instantly and begin displaying the file. ^ Enter multiple commands in a command line by separating them with semicolons. Selecting a menu is not a separate command and does not need to be followed by a semicolon, though it will not hur_t to do so. The semicolon answers any remaining prompts in the current command with line returns and moves on to the next command. This gives you a quick way to select menu options with ` default parameters. For example, F;[RETURN] gives you a listing of the working directory on the screen. You can also use a command line to print everything that appears on the screen tao your printer. Type [CONTROL][P] and everything will be printed as it appears on the screen. This command helps you keep track of your work. This feature can be turned off by typing [CONTROL][P] again. b A command line cannot be more than two screen lines (80 characters) long. Consider this example. You have booted up and want to set the date, create a new directory for some temporary files, c and exit to BASIC. The following command line would do it: .S S 31OC00;.F N D1>TEMP;.E[RETURN] This command line works likes this: *The period insures dthat we are in the Main menu. We already were, but it does not hurt to make sure whenever you change menus. *The first S selects the System Function menu. *The second S selects the eSet date option. *31OC88 is the date you want to enter. *The semicolon indicates the end of the command. *The period returns you to the Main menu. fPAGE 72 *The F selects the File Access menu. *The N selects the New Directory option. *D1>TEMP is the pathname of the new directory. *The semicolon ends the cgommand. *The period starts the next command and returns to the Main menu. *The E exits to BASIC. The workings of the spaces, semicolons, and [RETURNS] can h be a little confusing, so here are the rules: 1. A space, or group of spaces, are treated as a [RETURN]. 2.A semicolon answers all the remaining prompts in a command wiith [RETURN]s. 3. Spaces adjacent to a semicolon are ignored. 4. Spaces adjacent to a [RETURN] are ignored. 5. A semicolon followed by a [RETURN] (for exajmple, at the end of a line) is treated as a semicolon alone. BATCH FILES Batch files are command lines which are saved as text files. When a batch file is runk with the Run A Batch File option in the System Function menu, the command lines are executed. A batch file named AUTORUN.BAT runs automatically when DOS XE is booted. Commands may be l separated by semicolons as in command lines, or they may be on individual lines separated by [RETURN]s. A batch file is limited to 511 bytes, but it can run another batch file if the last command is .S mR FILENAME. The ! symbol can be used for a comment line which can be PAGE 73 read on the screen but will be ignored by DOS XE. n Since Batch Files can be saved for a long time, it is a good idea to use descriptive words for commands instead of initials. It is also important to remember that batch files are run from the System Founction menu. Since batch files are text files, it is easy to review the contents of one with the View File option in the File Access menu. Batch files are usually identified by the extender ".BAT". p Here is an example of a batch file which creates a new directory for temporary files and selects it as the working directory, returns to the Main menu and exits to BASIC. .FILEqMENU NEWDIR D1>TEMP;WORKDIR D1>TEMP .E Batch files can be created with any text editor or word processor which produces ASCII text files (Atariwriter Plus and Atariwriter 80 rdo this with the "Save ASCII" command). Batch files also can be created directly from DOS XE by copying from the screen to a file. To do so, use the following command line: s .FILEMENU COPY E:D1>SAMPLE.BAT This takes you to the File Access menu, executes the Copy Files option, then gives the screen editor (E:) as the source and D1>SAMPLE.BAT ats the destination. The screen blacks out briefly, then comes up empty with the cursor in the upper left corner. You can now type your batch file using the Atari editing features. As uyou end each line with a [RETURN], it is sent to DOS XE. After you have entered the last line and the [RETURN], hold down [CONTROL] and type [3]. This is the code for the end of a file. DOS XE closes the file and revturns you to the File Access menu. Your batch file is ready. BINARY FILES Binary files are the standard DOS XE file format. They are PAwGE 74 created by the Save Memory To Binary File option in the Machine Language Access menu. They are also created by most programming assemblers and compilers. A binary file x begins with a 6 byte header which contains the following information. BYTE# DECIMAL HEXADECIMAL DESCRIPTION 1 255 FF Identification y code 2 255 FF for binary file 3 0 00 LSB Starting address 4 60 3C MSB 3C00 z (#15360) 5 255 FF LSB Ending address 6 91 5B MSB 5BFF { (#23551) The first two bytes are always FF FF (#255 #255). They are the identifying code for binary files. The next two bytes are the starting address in Least Significant Byte, Most | Significant Byte format. This is where DOS XE will begin loading the data into memory. The final two bytes are the ending address, again in LSB, MSB format. The data comes after the h}eader. There must be the same amount of data as memory between (and including) the starting and ending addresses. In a compound binary file, the data does not load into one continu~ous block of memory. It has two or more blocks of data which load into different areas. In the header for additional blocks, the FF FF identification code is optional.  PAGE 75 A compound binary file has the following format: BYTE* DECIMAL HEXADECIMAL DESCRIPTION 1 255 FF Identification code 2 255 FF for binary file 3 0 00 LSB Starting address 4 60  3C MSB 3C00 (#15360) 5 255 FF LSB Ending address 6 91 5B MSB 5BFF  (#23551) . . . . . . Data,2000 (#8192)bytes . . . 8199 255  FF ID code for binary 8200 255 FF file (optional) 8201 0 00 LSB Starting address  8202 6 06 MSB 0600 (#1536) 8203 128 80 LSB Ending address 8204 6 06 MSB 0680 (#1664) . . . . . . Data,0081 (#129)bytes . . .  Additional blocks follow the same format as the second block. Compound binary files can be produced by assemblers and compilers or they can be created with the Append Memory To A Binary File option in the Machine Language Access menu or the Append To A File option in the File Access menu. Memory locations 02E2-02E3 (#738-#739) are called INITAD. An optional initialisation address goes into them. If, during a binary load, DOS XE loads an address into INITAD, it immediately jumps (JSR) to the code pointed to by that address. The code is run and, if the code returns control to DOS XE, the binary load continues. The code to be run should be loaded before INITAD is loaded. PAGE 76 A compound binary file can have many initialisation  addresses and each will be run as it is loaded. DOS XE will append an initialisation address to the end of a binary file if you give the address during Save Memory To A Binary File.  NOTE:DOS XE leaves the loading file and the keyboard device(K:) open during the call to the initialisation code. Thus, such a code should not alter or use IOCBs (channels) 1 or 2.  Memory locations 02E0-02E1 (#736-#737) are called RUNAD. An optional run address goes into them. If a run address is loaded into RUNAD while DOS XE is executing the Run A Binary File option, DOS XE finishes the binary load and then jumps (JSR) to the code at the address. Since the code is not run until the binary load is complete, it can be loaded after RUNAD. If a compound  binary file has more than one run address, only the last one loaded will be executed. DOS XE will append a run address to the end of a binary file if you give it the address during the Save Memory To Binary File or the Append Memory To A Binary File options. The Load A Binary File option will load RUNAD along with the rest of the file, but will not jump to that address. When executing the Go To A Machine Language Program option, if you answer the START ADDRESS? prompt with an asterisk(*), DOS XE will go to the address in RUNAD. If a DOS XE disk has a binary file named AUTORUN.SYS in the root directory, that file will run automatically when the disk is booted up. If a batch file named AUTORUN.BAT is on the disk, it will be run after AUTORUN.SYS. USING DOS XE WITH OTHER DISK DRIVES DOS XE works with all Atari-compatible disk drives. It will, however, be limited to the capacities of those disk drives. When initialising a disk, it must be formatted so that your disk drive can read it. PAGE 77 Disk drives can read disk formats as follows: Atari 810  AT 810 only Atari 1050 AT810 or AT1050 Atari XF551 AT810. AT1050, SSDD, or XF551 51/4" SSDD AT810 or SSDD (some can also read AT1050 RAM disk 130RAM only  USING DOS XE WITH EXISTING PROGRAMS Every effort has been made to make DOS XE's power available to existing programs. Programs which perform DOS access through legal CIO calls should work with DOS XE. Most programs will need to be copied onto DOS XE disks. Memory conflicts should not be a problem unless the program uses the RAM under the operating system. Pathnames and subdirectories are available to any program which allows long filenames (such as programming languages). Other programs will be able to use at least one subdirectory, the working directory.  Most programs send filenames to DOS in the following form: D1:FILE.EXT DOS XE will interpret that to mean: D1>WORKING DIRECTORY>FILE.EXT Select the working directory before you run your program. Thanks to DOS XE's ability to run AUTORUN.BAT, this can be done automatically, even if the file boots without giving  you access to DOS XE. (See BATCH FILES in this chapter). Most programs can change the working directory. One feature of DOS XE is that if you append an equal sign (=) when you try to load a file which is actually a directory, it becomes the working directory and DOS XE returns an EOF (end of file). PAGE 78 If your program can digest an empty file (no data, just an EOF), then it should work. For example, if the working directory is D1> and the disk is organised as follows: PROGRAMS> /  / D1> \ BUSINESS> \ / LETTERS> \ SISTER> Your program gets a directory listing as follows: PROGRAM > LETTERS > Load "D1:LETTERS=" into your program. Your working directory is now D1>LETTERS. Your program gets a directory listing as follows: BUSINESS > SISTER > Load "D1:BUSINESS=". The working directory becomes D1>LETTERS>BUSINESS.  You can move around the tree by loading the > or < symbols as a filename. The < symbol moves you one step to the left in the tree. The > symbol returns you to the root directory. The < and > symbols can be combined with a short directory name. Load"D1:LETTERS>SISTER Load "D1:>PROGRAM=". The working directory changes to D1>PROGRAM. PAGE 79 CHANGES TO NOTE AND POINT NOTE and POINT are CIO programming commands. This section will be of interest only to programmers. In DOS XE, NOTE and POINT refer to a position within a file. In DOS 2.X, they refer to the absolute physical locations on the disk. By making them relative to the beginning of the file, DOS XE NOTE and POINT do not change when a file is copied to another disk. Also, NOTE and POINT can now refer to a position at or beyond the end of a file. This permits you to use POINT to append to files and to build files with holes in them. Space for the holes is not allocated on the disk until the holes are filled. So it is possible to have logical files larger than the actual disk space. DOS 2.X uses two numbers for NOTE and POINT, a two byte SECTOR number and a one byte BYTE number. DOS XE uses one three byte for the position within a file. These three bytes are passed in the same three byte space used by DOS 2.X. Most languages will want to interpret these three bytes as the two DOS 2.X numbers.  You may want to massage the results to get the correct values. For example, Atari BASIC expects two numbers, "sector" and "byte". You can substitute high and low and proceed as follows: (where OFFSET is the position within the file): NOTE#3 HIGH,LOW, OFFSET=LOW+256*HIGH or HIGH=INT(OFFSET/256)  LOW=OFFSET-(HIGH*256) POINT#3 HIGH,LOW PAGE 80      CHAPTER 9 STRUCTURE OF DOS XE DISK UTILISATION DOS XE supports disk drive sizes up to 16 Megabytes. Larger drives must be partitioned so logical drives are less than 16 Megabytes. Files can be up to 8 Megabytes long. All disks are addressed in 256 byte sectors. DOS XE simulates 256 byte sectors on 810 and 1050 disk drives, which have 128 byte sectors, by reading and writing sector pairs. Up to 64K sectors can exist on a single disk (64K x 256 bytes = 16 Megabytes).  SECTOR LABELS DOS XE uses a file structure with built in features to help restore damaged files. When a disk is initiated, DOS XE generates a random volume number. The number is two bytes long and the two bytes can never match. Directory, file map, and data sectors have six byte sector labels. A label contains the data needed to reconstruct damaged files. DOS XE uses sector labels to help identify bad sectors. Sector labels are organised as follows. BYTE DESCRIPTION 1-2 File ID number 3-4 Volume number 5-6 If byte 6=255($FF), it is a directory sector and byte 5 is a sequence number* within the directory. If byte 6 is between 128($80) and 254($FE) then byte 5 is the sequence number* of a file map sector. If byte 6 is 127($7F) or less, bytes 5 and 6 form a standard 6502 word-sized sequence number*.  PAGE 103 * The sequence number indicates the relative position of that sector within its series (that is, third directory sector, second file map sector, seventy fifth data sector, and so on.). SECTOR ORGANISATION A DOS XE disk has five types of sectors: Boot sectors, the Volume Table of Contents (VTOC), Directory, File map, and  data. Each is described below. BOOT SECTORS Sectors 1-3 contain information which allows the computer to find and load the boot program (the boot program is  usually DOS XE ). The boot sectors also contain a 32 byte Drive Table describing the physical and logical layout of the disk. The RAM disk does not have boot sectors. THE VOLUME TABLE OF C ONTENTS (VTOC) The VTOC starts in sector 4 and extends across as many sectors as needed to map the disk (one sector only on all drives discussed in this manual). The first 10 bytes give  information about the current status of the disk and the rest of the VTOC is a bit-map of the blocks on the disk. A bit set to 0 indicates a block which is in use. A bit set to 1 indicates a block which is f ree. DIRECTORY SECTORS The first directory block immediately follows the VTOC sectors. Additional directory blocks are allocated as needed and may be scattered throughout the disk. They are linked by a two byte pointer at the end of each block. Each directory entry contains the file name, information about the file, and up to 12 two-byte pointers which point to the  file map blocks for the file. A typical XF551 directory sector would be organised like the following one. PAGE 104 BYTE NUMBER NO.OF BYTES DESCRIPTION 1 1 File type 2-9 8 Filename 10-12 3 Filename extension 13-14 2 Number of sectors in the file  15 1 Number of bytes in last sector 16-19 4 First 4 bytes of sector label of this file. 20-43 24 12 pointers to file map blocks  14-45 2 Creation date* 46-47 2 Last modified date* 48-49 2 Reserved 50-245 196 4 more entries, 49 blocks each 246-248  3 Unused 249-250 2 Link to next sector in directory 251-256 6 Sector label *Date format: First byte, first seven bits: Year (00-99) First byte, last bit and second byte first three bits: Month (1-12) Second byte, last five bits: Day (1-31) FILE MAP SECTORS File map sectors are two bytes long and hold pointers to the data blocks. There is a pointer for each data block in the file. A typical file map sector would be as follows: BYTE NUMBER NO. OF BYTES DESCRIPTION 1-2 2 First data block pointer 3-250 248 124 more data block pointers 251-256 6 Sector label  PAGE 105 DATA SECTORS A typical XF551 data sector would be as follows: BYTE NUMBER NO. OF BYTES DESCRIPTION 1-250  250 File data 251-256 6 Sector label MEMORY UTILISATION DOS XE uses the same Zero Page memory locations and low memory area as DOS 2.0 and 2.5. It also uses RAM area "under" the operating system ROM. The following memory will not change in future versions of DOS XE: ADDRESS LABEL DESCRIPTION  $0709 MAXFILES Maximum # of concurrently open files. Same as DOS 2.0/2.5 $070A DVBYT Active drive map (1 bit per drive). Same as DOS 2.0/2.5 $070C BUFFERS Address of start of system buffers. Same as DOS 2.0/2.5 $0710 CDT Type of drive currently in use $0CC0 DTT Type numbers of all drives (0 and 9 reserved) MEMORY MAP OF DOS XE $0041-$0047 DOS XE Zero Page area - - - $0700-$1483 DOS XE core code $1484-$1CFB* DOS XE buffers $1CFC* Application program area (LOMEM) - - -  PAGE 106 In RAM Parallel with OS ROMS $C000-$CBFF DOS XE code $CC00-$CFFF Copy of International Character set $D800-$DFFF DOS XE code $E000-$E3FF Copy of US character set $E400-$FFFF DOS XE code *LOMEM value varies with the number of drives and file buffers. $ICFC is for 2 drives and 3 files, the same as DOS 2.0S.  PAGE 107 GLOSSARY ADDRESS A location in the computer's memory. Addresses in your Atari range from 0 !($0000) to 65,535 ($FFFF). APPEND To add on to the end of a file. BINARY FILE A disk file which does not require a special language (for example, BASIC ) to use. Binary files include ma"chine language programs, compiled programs, and memory images. BIT Short hand for "binary digit". The smallest unit of information in a computer. Can be either "0" or "1". BOOT When# a computer is turned on, it goes through a number of initialisation procedures. This is called "booting" or "booting up." BUFFER An area of memory reserved for special uses. BYTE Eight$ bits. In your Atari, most operations process eight bits (one byte) at a time. DAISY CHAIN Two or more peripherals connected to each other by serial I/O cables. DATA Information of any %kind. DECIMAL Our common number system. Uses base 10 and characters 0,1,2,3,4,5,6,7,8,9. DEFAULT The condition or value which exists unless you have specifically changed it. & DELIMITER A character that marks the beginning or end of a data item, but is not part of it. For example, BASIC uses quotation marks (") as delimiters for strings. DENSITY The denseness of d'ata stored on the disk. The XF551 supports three densities: Single Density stores 90K bytes, Dual Density stores 127K bytes, and Double density stores 180K per disk side. DESTINATION The device,( file, or address which receives data during a transfer. See SOURCE. DIRECTORY A subgroup of files on a disk. DISK (also called a DISKETTE) A round flat plastic disk inside a squar)e envelope. The disk is coated with a magnetic recording/playback medium. Disks are used to store information for computers. PAGE 108 DOS Abbreviation for* Disk Operating System. The program that allows the use of a disk drive system. DOS XE.SYS Filename reserved for DOS XE. DOS XE The Atari DOS for the XF551 disk drive. Also for earli+er Atari disk drives. DRIVE NUMBER An integer from 1 to 8 which specifies the drive to be used. EOF End Of File. The end of a given file. EOL End Of Line. The marker for t,he end of a data string. On the Atari it is the ATASCII character 155 ($9B). EXTENSION An extension of a filename. It is separated from the filename by a period (full stop)(.) and is composed of up- to three characters. The characters can be capital letters or numbers. Extensions are often used to indicate he type of file, for example .DAT for data files, .BAS for BASIC files, and so on. . FILE A collection of data stored under one name. FILENAME The name used to identify a file. DOS XE filenames can be up to eight characters long. Can be followed by an extension of up to three characters (/See EXTENSION). FILE POINTER Pointers maintained by DOS XE to keep track of where a file was last accessed. Each OPEN file has its own file pointer. FORMAT The arrangement of tracks a0nd sectors on a disk. Single density (AT810 Format) has 40 tracks, 18 sectors per track, 128 bytes per sector. Dual density (AT1050 Format) has 40 tracks, 26 sectors per track, 128 bytes per sector. Double 1density (SSDD Format) has 40 tracks, 18 sectors per track, 256 bytes per sector. Double density, double sided (XF551 Format) has 80 tracks (40 per side), 18 sectors per track, 256 bytes per sector. (Format is also som2etimes used interchangeably with Initialise-see INITIALISE). HEXADECIMAL (Usually called HEX) A number system. Uses base 16 and characters 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F. INITIALISE To 3prepare a disk for use with a disk drive. Initialising a disk erases any old information on the disk and sets out the tracks and sectors for the proper density. PAGE 1094 KILOBYTE (Usually called K or KBYTE) 1024 bytes. For example, 16K is actually 16,384 bytes (16 x 1024). Note the DOS XE uses K to mean 1000 for file sizes and disk free pace. 5 PARAMETER A variable in a command or a function. RECORD A block of data delimited by EOL characters. SECTORS The BASIC organisational unit for disks. In single and dual densities a sect6or is 128 bytes. In double density a sector is 256 bytes. SOURCE The device, file, or address which contains the data to transfer (See DESTINATION). STRING A sequence of characters us7ually delimited by quotation marks ("). TRACK A circular path around the surface of a disk. There are 40 tracks per side of an Atari disk. WRITE-PROTECT To prevent a disk drive fro8m changing the information on a disk. Atari disks are write-protected by covering a notch on the side of the disk with an opaque sticker. 9PAGE 110 ERROR MESSAGES 001 INVALID NUMBER OR DATE The number or date was entered incorrectly. 002 INVALID LOAD FILE The fil:e you tried to load or run is not a binary file. 003 INVALID ADDRESS DOS XE does not recognise the address entered. Make sure you have entered it correctly (decimal or hex). ; 004 NUMBER NEEDED A required number was left out. 128 BREAK The [BREAK] key was pressed. 129 IOCB ALREADY OPEN The I/O channel you tried to OPEN is <already open. CLOSE it first, then reOPEN it. 130 INVALID FILE/DEVICE NAME DOS XE does not recognise the file name or device name. Make sure the pathname is correct. = 131 FILE NOT OPEN FOR READ A READ operation was attempted on a file which was not OPENed for READ. CLOSE the file and OPEN it for READ (example: OPEN#1,4,0,"D:FILENAME") 132 ILLE>GAL DEVICE HANDLER COMMAND DOS XE did not recognise the command passed to it by the device handler. 133 DEVICE/FILE NOT OPEN An operation was attempted on a file which was not ? OPENed. OPEN the file. 134 BAD IOCB NUMBER The IOCB number was not in the range 0-7. 135 IOCB READ ONLY A WRITE operation was attempted on a file which was @ not OPENed for WRITE. CLOSE the file and OPEN it for WRITE (example: OPEN#1,8,0,"D:FILENAME") 136 UNEXPECTED END OF FILE A POINT command pointed beyond the end of a file. A PAGE 111 137 TRUNCATED RECORD The file ended before it was supposed to. The file may be damaged. 138 HARDWARE CONNECTION PROBLEMS DevicBe timeout. DOS XE did not receive an acknowledgement from the device, usually because the device is improperly connected or turned off. 139 HARDWARE CONNECTION PROBLEMS Device NAK. DOCS XE did not receive an acknowledgement from the device, usually because the device is improperly connected or turned off. 140 SERIAL FRAME ERROR Communications between the computer aDnd other devices is garbled. You must reboot the computer. 141 CURSOR OUT OF RANGE The cursor is off the screen for the graphics made you are in. Change the cursor location. Not a DOSE XE specific error. 142 SERIAL BUS OVERRUN Timing problems on the serial bus. Try the operation again. This is a very rare error. If it happens more than once, have youFr equipment checked for hardware problems. 143 CHECKSUM ERROR Communication between the computer and other devices is garbled. The checksum sent by the device does not Gmatch the one calculated by the computer. There is no standard recovery procedure because it could be either a hardware or software problem. 144 DISK PROBABLY WRITE PROTECTED The diskH drive is unable to execute a valid command. It may be an attempt to format or write to a protected disk. It may be an attempt to read a disk formatted in a density your drive doesn't support. It I may also be caused by incorrect disk speed or an unformatted disk. 145 ILLEGAL SCREEN MODE The screen editor was OPENed with an illegal graphics mode number. Not a DOS XE specifJic error. 146 FUNCTION NOT IMPLEMENTED The device does not support the operation requested, for example, WRITEing to the keyboard. PAGE 112 K 147 INSUFFICIENT RAM Not enough available memory for the graphics mode selected. Not a DOS XE specific error. 160 DRIVE NUMBER ERROR The number selected was not between 1L and 8, or the disk drive was turned off when the computer was booted. 161 NO MORE FILE BUFFERS All the file transfer buffers are in use. Reconfigure your system (See CMONFIGURING DOS XE, CHAPTER 2). Also caused by a batch file longer than 511 bytes. 162 DISK FULL No more space on the disk. Delete a file from your disk or use another disk. N Disk capacity: single density - 92160 bytes dual density - 133120 bytes double density - 368640 bytes. 163 UNRECOVERABLE SYSTEM I/O ERROR The DOSO XE disk is damaged and has loaded a bad DOS. Use another copy. 164 FILE NUMBER MISMATCH The file is damaged. Reboot your system and try to access the file again. If it still fails, tPhe file is lost. 165 INVALID FILE/DEVICE NAME The pathname has illegal characters. 166 UNEXPECTED END OF FILE A POINT command pointed beyond the end of a file inQ read mode. (Not an error when writing a file unless the point goes past the last possible legal file position-374999 for most drive types.) 167 CAN'T WRITE/ERASE PROTECTED FILES R The file is protected. UNPROTECT it before ERASEing it or WRITing to it. 168 INVALID COMMAND FOR DEVICE You tried to copy a DOS XE file to a DOS 2.X disk. 170 FILE DSOES NOT EXIST File is not in the specified directory. 171 POINT INVALID You tried to POINT to a file which was not OPENed for update (example: OPEN#1,12,0,"D:PATHNAME"). T PAGE 113 172 BAD DEVICE OR DISK TYPE There was an attempt to access a disk of the wrong format, for example, a DOS 2.X disk. 173 CAN'T INITIALUISE DISK The drive has no disk, the latch is not closed, or the disk has a damaged surface. 176 BAD DEVICE OR DISK TYPE The wrong disk format type was given during the Vinitialise process. 177 INVALID SUBDIRECTORY REQUEST You attempted to create a new directory with the same pathname as one which already exists. 178 FILE NUMBER/MAP/LINK MISMATWCH The file is damaged. Reboot your system and try to access the file again. If it still fails, the file is lost. 179 INVALID SUBDIRECTORY REQUEST You tried to use a diXrectory as an ordinary file. 180 INVALID SUBDIRECTORY REQUEST You tried to erase a directory with the Erase Files command. Use the Delete Directory command instead. 253 SYSTEM YERROR Unrecoverable DOS XE system problem. For example, you tried to erase a damaged file. A damaged file cannot be erased. ZPAGE 114[